Skip to main content

Troubleshooting

This document serves as a guide for the most common issues developers may encounter when implementing solutions within the gov.gr ecosystem. It is part of the official technical documentation and includes recommended solutions to frequent problems during the development of gov.gr applications.

Error: Invalid redirect_uri

  • Description: The redirect URI used in the OAuth/OpenID flow is not registered with the provider.
  • Solution: Confirm that the URI is registered on the platform (GSIS or other Identity Provider).
  • Tip: Watch out for trailing slashes or mismatches between http and https.

Error: Expired Token

  • Description: The access token has expired.
  • Solution: Use the refresh token flow.
  • Tip: Don’t rely on long-lived tokens. Get new tokens before expiration.

Error: 401 Unauthorized in Web Service

  • Description: A call to a SOAP API is rejected due to bad credentials or incorrect authentication header.
  • Solution: Make sure you're using the correct username/password and sending them with Basic Auth header.
  • Tip: Check the SSL certificates and the formatting of SOAP headers.

Error: JSON Parse Error in API Response

  • Description: The API response is malformed or not in JSON format.
  • Solution: If the response is SOAP/XML, use xmltodict or a similar library.
  • Tip: Always wrap parsing in try/catch and use logging.

Local Testing Errors

  • Description: The login redirect doesn't work correctly in the local environment.
  • Solution: Make sure you've declared the local redirect URI (e.g. http://localhost:8000/authorize/) in the service.
  • Tip: For Django, check if there's a conflict with the CSRF middleware.

User with Same VAT Number Cannot Log In

  • Description: If a user with the same VAT number (AFM/vat_number) already exists and a new login is attempted, it fails.
  • Solution: Delete the existing user or clear the null value of the vat_number field from the database.
  • Tip: This mostly applies to local testing with social-auth-gsis.

We'd love your feedback
Was this helpful?